<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <vue-ueditor-wrap v-model="msg" :config="editorConfig" editor-id="editor-demo-01" :editor-dependencies="editorDependencies"
    style="width:700px"
    />
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
import VueUeditorWrap from 'vue-ueditor-wrap';
import '/public/UEditor/ueditor.config.js'
import '/public/UEditor/ueditor.all.min.js'
import '/public/UEditor/lang/zh-cn/zh-cn.js'
import '/public/UEditor/ueditor.parse.min.js'
export default {
  name: 'App',
  components: {
    HelloWorld,
    VueUeditorWrap
  },
  data () {
    return {
      msg: '<h2>Hello World!</h2>',
      editorConfig: {
        // 访问 UEditor 静态资源的根路径，可参考 https://hc199421.gitee.io/vue-ueditor-wrap/#/faq
        UEDITOR_HOME_URL: "/UEditor/",
        // 服务端接口（这个地址是我为了方便各位体验文件上传功能搭建的临时接口，请勿在生产环境使用！！！）
        serverUrl: "http://127.0.0.1:9001/ossupload",
      },
      // 指定依赖的资源列表，下面的 JS 会依次加载，注意顺序。实际请求资源时会拼接上 UEDITOR_HOME_URL，当然你也可以填完整的 URL
      editorDependencies : [
        'ueditor.config.js',
        'ueditor.all.min.js',
        // 添加秀米相关的资源
        'xiumi-ue-dialog-v5.js',
        'xiumi-ue-v5.css',
      ]
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
